import  flyio from 'flyio'
import Base from '../../config/testing.env'


let base =  Base.BASE_API
// export const getIterationStatus=(params)=>{return flyio.get(`${base}/manager/getIterationStatus`)}//迭代状态枚举
export const uploadzip=()=>{return  `${base}/shuiyou/szjk/upload` } //上传zip文件
export const getZipList=()=>{return  flyio.get( `${base}/shuiyou/szjk/getzipnames`)}
export const getFileContents = (params)=> { return  flyio.post( `${base}/shuiyou/szjk/getFileContents`,params)}
export const getjufanFileContents = (params)=> { return  flyio.post( `${base}/shuiyou/szjk/getjufanFileContents`,params)}
export const submitfiles = (id,title,params)=> { return  flyio.post( `${base}/shuiyou/szjk/submit/${id}/${title}`,params)}


export const downloadzip = (params) => {return  flyio.get( `${base}/practise/download`,params ,{responseType:"blob"})}



export const downloadzipURL = (param)=>{return `${base}/practise/download?fileName=${param}`}


export  const  sendzip =  (params)=>{return flyio.get( `${base}/shuiyou/szjk/send`,params)}  //send/{typeid}/{path}

export const  getziptypes = ()=>{return  flyio.get( `${base}/shuiyou/szjk/getziptypes`)}

export const saveziptype = (params)=>{ return  flyio.post( `${base}/shuiyou/szjk/saveziptype`,params)}

export const savezChanges = (zipid,title,params)=>{ return  flyio.post( `${base}/shuiyou/szjk/saveRecord/${zipid}/${title}`,params)}


//export const searchRedis = (params,token)=>{return  flyio.post( `${base}/shuiyou/szjk/saveziptype`,params,{headers:{token:token}})}
//export const searchRedis = (params,token)=>{return  flyio.post( `${base}/shuiyou/szjk/saveziptype`,params,{headers:{token:token}})}
export const    getsqlenvs = (params)=>{ return  flyio.get( `${base}/shuiyou/common/getsqlenvs`,params)}       ///shuiyou/common/getsqlenvs
export const    getRuleInfo = (sqlenv,ruleid,params)=>{ return  flyio.get( `${base}/shuiyou/common/getRuleInfo/${sqlenv}/${ruleid}`,params)}       ///shuiyou/common/getsqlenvs
export const    getRedisFiles = (nsrid,params)=>{ return  flyio.get( `${base}/shuiyou/common/getRedisFile/${nsrid}`,params)}       ///shuiyou/common/getsqlenvs
export const    updataRedisContent = (nsrid,params)=>{ return  flyio.post( `${base}/shuiyou/common/updataRedisContent/${nsrid}`,params)}       ///shuiyou/common/getsqlenvs
export const    getRuleResult = (nsrid,ruleid,params)=>{ return  flyio.get( `${base}/shuiyou/common/getRuleResult/${nsrid}/${ruleid}`,params)}       ///shuiyou/common/getsqlenvs

//getRuleResult/{nsrid}/{ruleid}

